{% extends "../main.html" %}
{% block head_js %}
<link href="{{static_url('datatable/jquery.dataTables.css')}}" rel="stylesheet">
<!--link href="http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css" rel="stylesheet"-->
<style type="text/css">
document.getElementById("uploadBtn").onchange = function () {
    document.getElementById("uploadFile").value = this.value;
};
#red {color: red;}
#blue {color: blue;}
#orange {color: orange;}
#green {color: green;}
a {color: inherit;}


</style>
{% end %}

{% block bodyy %}
<!--<a href="/rsync/file" class="btn btn-primary btn-lg btn-block">同步文件列表</a><br>-->
<h3 class="sub-header" content="">监控列表</h3>
<form method="post">
    <table id="hosts" class="table table-striped">
        <thead>
        <tr>
            <th>选择</th>
            <th>文件名称</th>
        </tr>
        </thead>
        <tbody>
        {% for i in res %}
        <tr>
            <td><input name="filename" type="checkbox" value="{{i}}"/></td>
            <td>{{i}}</td>
        </tr>
        {% end %}

        </tbody>
    </table>
    <div class="col-sm-offset-4 col-sm-8">
        <button type="submit" name="cmd" value="rsync" class="btn btn-primary">一致性同步</button>
        <button type="submit" name="cmd" value="update_rsync" class="btn btn-danger">更新同步</button>
    </div>
</form>

{% end %}
{% block body_js %}
<script src="{{ static_url('datatable/jquery.dataTables.min.js') }}"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#hosts').dataTable({
            "language": {
                "url": "{{ static_url('datatable/Chinese.json') }}"
            }
        });
    });


</script>
{% end %}

